package ru.study.thinkin.chapter10.gui;

import ru.study.thinkin.chapter10.gui.GreenhouseControls.Bell;



public class GreenhouseController {

	
	public static void main(String[] args) {
		GreenhouseControls gs = GreenhouseControls.getInstance();
		//GreenhouseControls gs = new GreenhouseControls();
				
		Bell b1 = gs.new Bell(900);
		Bell b2 = gs.new Bell(100);
		
		/*System.out.println(b1.getEventId());
		System.out.println(b2.getEventId());
		System.out.println("===");
		System.out.println(b1.getGreenId());
		System.out.println(b2.getGreenId());
		System.out.println("===");
		System.out.println(b1.getConId());
		System.out.println(b2.getConId());
		*/
		
		//gs.addEvent(b1);
		
		Event[] eventBox = {b1,gs.new WaterOff(100),gs.new LightOff(200),gs.new WaterOn(100),gs.new LightOn(200)}; 		
		gs.addEvent(gs.new Restart(5,eventBox));
		//gs.addEvent(gs.new WaterOff(100));
		//gs.run();
		
		gs.addEvent(new GreenhouseControls.Terminate(new Integer(1000)));
		gs.run();
		
	}

}
